-
Notifications
You must be signed in to change notification settings - Fork 27
Tatsiana Kavalchuk #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Change to handling error case with func without args ('abs')
Пока только код калькулятора |
|
|
||
def check_brackets(exprstr): | ||
""" Checking for brackets balance """ | ||
if ('(' and ')') in exprstr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В чём назначение этой проверки?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Проверить, если в выражении есть скобки, то сбалансировано ли их количество, а также нет ли закрывающей скобки раньше открывающей.
Но после вопроса уже сомневаюсь в необходимости.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В условиях цейтнота добавила возможность импорта модулей и загрузила тестовые файлы для проверки приоритета функций и констант, и не обратила внимания, что эта функциональность не проверяется скриптом.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Выражение ('(' and ')')
всегда будет возвращать ')'. Таким образом if ('(' and ')') in exprstr
проверяет есть ли в строке )
No description provided.